package linuxbox.poll.logic;

public class BoxPollReplyEntry
{
	protected	int m_iID = 0;
	protected int m_iPollID = 0;
	protected int m_iChoiceID = 0;
	protected int m_UserID = -1;

  public BoxPollReplyEntry()
  {
  }
  public BoxPollReplyEntry(int id)
  {
    m_iID = id;
  }

  public void copyFrom(BoxPollReplyEntry entry)
  {
    m_iID = entry.getID();
    m_iPollID = entry.getPollID();
    m_iChoiceID = entry.getChoiceID();
    m_UserID = entry.getUserID();
  }

  public boolean equals(Object obj)
  {
    if ( obj == null )
      return false;
    BoxPollReplyEntry entry = (BoxPollReplyEntry) obj;
    return m_iID == entry.getID();
  }

	public int getID()
	{
		return m_iID;
	}
	public void setID(int id)
	{
		m_iID = id;
	}

	public int getPollID()
	{
		return m_iPollID;
	}
	public void setPollID(int id)
	{
		m_iPollID = id;
	}

  public int getChoiceID()
	{
    return m_iChoiceID;
	}
  public void setChoiceID(int id)
	{
    m_iChoiceID = id;
	}

  public int getUserID()
	{
    return m_UserID;
	}
  public void setUserID(int userID)
	{
    m_UserID = userID;
	}

  public String toString()
  {
    String s = "id=" + m_iID
	              + ", m_iPollID=" + m_iPollID
	              + ", m_iChoiceID=" + m_iChoiceID
	              + ", m_UserID=" + m_UserID
                + "\n";
    return s;
  }
}
